package com.rayo.accesscontrollercopy.model.db.bean;

import com.alibaba.fastjson.annotation.JSONField;
import com.litesuits.orm.db.annotation.Column;
import com.litesuits.orm.db.annotation.Table;
import com.rayo.accesscontrollercopy.config.NetworkConfig;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * Created by yanghaojie on 16/7/27.
 */
@Table("keyplantemp_table")
public class PlanKeyTempData extends BaseModel {
    public static final String USER_ID = "userid";

    @Column(USER_ID)
    private int userid;
    @JSONField(format = NetworkConfig.JSON_DATE)
    private Date expiry;
    @JSONField(format = NetworkConfig.JSON_TIME)
    private Date begin;
    @JSONField(format = NetworkConfig.JSON_TIME)
    private Date end;

    private List<String> locklist;

    public PlanKeyTempData() {

    }

    public PlanKeyTempData(int userid) {
        this.userid = userid;
        this.expiry = new Date();
        this.begin = new Date();
        this.end = new Date();
        this.locklist = new ArrayList<>();
        this.editime = new Date();
    }

    public int getUserid() {
        return userid;
    }

    public void setUserid(int userid) {
        this.userid = userid;
    }

    public Date getExpiry() {
        return expiry;
    }

    public void setExpiry(Date expirydate) {
        this.expiry = expirydate;
    }

    public Date getBegin() {
        return begin;
    }

    public void setBegin(Date begin) {
        this.begin = begin;
    }

    public Date getEnd() {
        return end;
    }

    public void setEnd(Date end) {
        this.end = end;
    }

    public List<String> getLocklist() {
        return locklist;
    }

    public void setLocklist(List<String> locklist) {
        this.locklist = locklist;
    }
}
